package com.gitee.wsl.time.local

import com.gitee.wsl.time.offset
import kotlinx.datetime.UtcOffset
import kotlin.time.Duration.Companion.hours
import kotlin.time.Duration.Companion.minutes

enum class Timezone(val abbr: String, val offset: UtcOffset, val long: String = abbr) {
    PDT("PDT", -7),
    PST("PST", -8),
    GMT("GMT", 0),
    UTC("UTC", 0),
    CET("CET", +1),
    CEST("CEST", +2),
    ACDT("ACDT", +10, 30),
    ACST("ACST", +9, 30),
    ACT("ACT", -5),
    ACWST("ACWST", +8, 45),
    ADT("ADT", -3),
    AEDT("AEDT", +11),
    AEST("AEST", +10),
    AFT("AFT", +4, 30),
    AKDT("AKDT", -8),
    AKST("AKST", -9),
    ALMT("ALMT", +6),
    AMST("AMST", -3),
    AMT_BRAZIL("AMT", -4, long = "AMT_BRAZIL"),
    AMT_ARMENIA("AMT", +4, long = "AMT_ARMENIA"),
    ANAT("ANAT", +12),
    AQTT("AQTT", +5),
    ART("ART", -3),
    AST_ARABIA("AST", +3, long = "AST_ARABIA"),
    AST_ATLANTIC("AST", -4, long = "AST_ATLANTIC"),
    AWST("AWST", +8),
    AZOST("AZOST", 0),
    AZOT("AZOT", -1),
    AZT("AZT", +4),
    BDT("BDT", +8),
    BIOT("BIOT", +6),
    BIT("BIT", -12),
    BOT("BOT", -4),
    BRST("BRST", -2),
    BRT("BRT", -3),
    BST_BANGLADESH("BST", +6, long = "BST_BANGLADESH"),
    BST_BOUGAINVILLE("BST", +11, long = "BOUGAINVILLE"),
    BST_BRITISH("BST", +1, long = "BRITISH"),
    BTT("BTT", +6),
    CAT("CAT", +2),
    CCT("CCT", +6, 30),
    CDT_AMERICA("CDT", -5, long = "CDT_AMERICA"),
    CDT_CUBA("CDT", -4, long = "CDT_CUBA"),
    CHADT("CHADT", +13, 45),
    CHAST("CHAST", +12, 45),
    CHOT("CHOT", +8),
    CHOST("CHOST", +9),
    CHST("CHST", +10),
    CHUT("CHUT", +10),
    CIST("CIST", -8),
    CIT("CIT", +8),
    CKT("CKT", -10),
    CLST("CLST", -3),
    CLT("CLT", -4),
    COST("COST", -4),
    COT("COT", -5),
    CST_AMERICA("CST", -6, long = "CST_AMERICA"),
    CST_CHINA("CST", +8, long = "CST_CHINA"),
    CST_CUBA("CST", -5, long = "CST_CUBA"),
    CT("CT", +8),
    CVT("CVT", -1),
    CWST("CWST", +8, 45),
    CXT("CXT", +7),
    DAVT("DAVT", +7),
    DDUT("DDUT", +10),
    DFT("DFT", +1),
    EASST("EASST", -5),
    EAST("EAST", -6),
    EAT("EAT", +3),
    ECT_CARIBBEAN("ECT", -4, long = "ECT_CARIBBEAN"),
    ECT_ECUADOR("ECT", -5, long = "ECT_ECUADOR"),
    EDT("EDT", -4),
    EEST("EEST", +3),
    EET("EET", +2),
    EGST("EGST", 0),
    EGT("EGT", -1),
    EIT("EIT", +9),
    EST("EST", -5),
    FET("FET", +3),
    FJT("FJT", +12),
    FKST("FKST", -3),
    FKT("FKT", -4),
    FNT("FNT", -2),
    GALT("GALT", -6),
    GAMT("GAMT", -9),
    GET("GET", +4),
    GFT("GFT", -3),
    GILT("GILT", +12),
    GIT("GIT", -9),
    GST_GEORGIA("GST", -2, long = "GST_GEORGIA"),
    GST_GULF("GST", +4, long = "GST_GULF"),
    GYT("GYT", -4),
    HDT("HDT", -9),
    HAEC("HAEC", +2),
    HST("HST", -10),
    HKT("HKT", +8),
    HMT("HMT", +5),
    HOVST("HOVST", +8),
    HOVT("HOVT", +7),
    ICT("ICT", +7),
    IDLW("IDLW", -12),
    IDT("IDT", +3),
    IOT("IOT", +3),
    IRDT("IRDT", +4, 30),
    IRKT("IRKT", +8),
    IRST("IRST", +3, 30),
    IST_INDIA("IST", +5, 30, long = "IST_INDIA"),
    IST_IRISH("IST", +1, long = "IST_IRISH"),
    IST_ISRAEL("IST", +2, long = "IST_ISRAEL"),
    JST("JST", +9),
    KALT("KALT", +2),
    KGT("KGT", +6),
    KOST("KOST", +11),
    KRAT("KRAT", +7),
    KST("KST", +9),
    LHST_STD("LHST", +10, 30, long = "LHST_STD"),
    LHST_SUMMER("LHST", +11, long = "LHST_SUMMER"),
    LINT("LINT", +14),
    MAGT("MAGT", +12),
    MART("MART", -9, 30),
    MAWT("MAWT", +5),
    MDT("MDT", -6),
    MET("MET", +1),
    MEST("MEST", +2),
    MHT("MHT", +12),
    MIST("MIST", +11),
    MIT("MIT", -9, 30),
    MMT("MMT", +6, 30),
    MSK("MSK", +3),
    MST_MALAYSIA("MST_", +8, long = "MST_MALAYSIA"),
    MST_AMERICA("MST", -7, long = "MST_AMERICA"),
    MUT("MUT", +4),
    MVT("MVT", +5),
    MYT("MYT", +8),
    NCT("NCT", +11),
    NDT("NDT", -2, 30),
    NFT("NFT", +11),
    NOVT("NOVT", +7),
    NPT("NPT", +5, 45),
    NST("NST", -3, 30),
    NT("NT", -3, 30),
    NUT("NUT", -11),
    NZDT("NZDT", +13),
    NZST("NZST", +12),
    OMST("OMST", +6),
    ORAT("ORAT", +5),
    PET("PET", -5),
    PETT("PETT", +12),
    PGT("PGT", +10),
    PHOT("PHOT", +13),
    PHT("PHT", +8),
    PKT("PKT", +5),
    PMDT("PMDT", -2),
    PMST("PMST", -3),
    PONT("PONT", +11),
    PYST("PYST", -3),
    PYT("PYT", -4),
    RET("RET", +4),
    ROTT("ROTT", -3),
    SAKT("SAKT", +11),
    SAMT("SAMT", +4),
    SAST("SAST", +2),
    SBT("SBT", +11),
    SCT("SCT", +4),
    SDT("SDT", -10),
    SGT("SGT", +8),
    SLST("SLST", +5, 30),
    SRET("SRET", +11),
    SRT("SRT", -3),
    SST_SAMOA("SST", -11, long = "SST_SAMOA"),
    SST_SINGAPORE("SST", +8, long = "SST_SINGAPORE"),
    SYOT("SYOT", +3),
    TAHT("TAHT", -10),
    THA("THA", +7),
    TFT("TFT", +5),
    TJT("TJT", +5),
    TKT("TKT", +13),
    TLT("TLT", +9),
    TMT("TMT", +5),
    TRT("TRT", +3),
    TOT("TOT", +13),
    TVT("TVT", +12),
    ULAST("ULAST", +9),
    ULAT("ULAT", +8),
    UYST("UYST", -2),
    UYT("UYT", -3),
    UZT("UZT", +5),
    VET("VET", -4),
    VLAT("VLAT", +10),
    VOLT("VOLT", +4),
    VOST("VOST", +6),
    VUT("VUT", +11),
    WAKT("WAKT", +12),
    WAST("WAST", +2),
    WAT("WAT", +1),
    WEST("WEST", +1),
    WET("WET", 0),
    WIT("WIT", +7),
    WST("WST", +8),
    YAKT("YAKT", +9),
    YEKT("YEKT", +5),
    ;

    constructor(abbr: String, hours: Int, minutes: Int = 0, long: String = abbr) : this(abbr, (hours.hours + minutes.minutes).offset, long)
}